import React, { Component } from 'react'

export default class Child extends Component {

    state = {
        // users:[
        //     {id:'001',name:'tom',age:15},
        //     {id:'002',name:'jack',age:55},
        //     {id:'003',name:'jerry',age:19},
        // ]
        users:'abc'
    }
    render() {
        return (
            <div>
                <h2>我是child组件</h2>
                {
                    this.state.users.map((userObj)=>{
                        return <h4 key={userObj.id}>{userObj.name}---{userObj.age}</h4>
                    })
                }
            </div>
        )
    }
}
